<template>
    <div class="select_class">
        <div class="main" @click="showDetail">
            <div class="left">
                <div>已到期:</div>
            </div>
            <div class="flex" ><div class="desc">{{detail.expire}}人</div><div class="more"></div></div>
            
        </div>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                useInfo: '',
                detail: '',
            }
        },
        methods: {
            getDetail() {
                var params = {
                    schoolId: this.useInfo.schoolId
                }
                var url = "/servicePattern/payDataSelective";
                this.$api.post(url, params, (data) => {
                    console.log(JSON.stringify(data));
                    this.detail = data.info
                })
            },
            getUserInfo() {
                this.useInfo = JSON.parse(sessionStorage.getItem('useInfo'));
                console.log(sessionStorage.getItem('useInfo'));
            },
            showDetail() {
                this.$router.push({
                    path: 'g16_1'
                })
            }
        },
        created() {
            this.getUserInfo();
            this.getDetail();
        }
    }
</script>